﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="AdminGiaoVien.ascx.cs" Inherits="Controls_AdminGiaoVien" %>
<div class="container_12">

    <asp:Label ID="lblKQ" runat="server"></asp:Label> 
    <asp:ListView ID="lvGiaoVIen" runat="server" InsertItemPosition="LastItem" DataKeyNames="ID"
        OnItemCommand="lvGiaoVIen_ItemCommand"
        
        oniteminserted="lvGiaoVIen_ItemInserted" onitemdeleting="lvGiaoVIen_ItemDeleting" 
        >
    <LayoutTemplate>
        <div class="grid_12" id="title">
           <div class="grid_2"><asp:Label ID="Label1" runat="server" Text="ID"></asp:Label> </div>
           <div class="grid_2"><asp:Label ID="Label2" runat="server" Text="MaGV"></asp:Label> </div>
           <div class="grid_2"><asp:Label ID="Label3" runat="server" Text="TenGV"></asp:Label></div>
           <div class="grid_2"><asp:Label ID="Label4" runat="server" Text="Email"></asp:Label></div>
            </div>
         <asp:placeholder ID="itemPlaceholder" runat="Server"></asp:placeholder>
        
    </LayoutTemplate>

    <ItemTemplate>
        <div class="grid_12" id="item1">
            <div class="grid_2"><asp:Label ID="lblID" runat="server"><%#Eval("ID") %></asp:Label> </div>
            <div class="grid_2"><asp:Label ID="lblMaGV" runat="server" ><%#Eval("MaGV") %></asp:Label> </div>
            <div class="grid_2"><asp:Label ID="lblTenGV" runat="server"><%#Eval("TenGV") %></asp:Label></div>
            <div class="grid_2"><asp:Label ID="lblEmail" runat="server"><%#Eval("Email") %></asp:Label></div>
              <asp:LinkButton ID="EditButton" runat="server" CommandName="Edit" Text="Edit" />
              <asp:LinkButton ID="lnkDel" runat="server" Text="Delete" CommandName="Delete" OnClientClick="return confirm('Delete this entry?')" />
              </div>
    </ItemTemplate>
    <AlternatingItemTemplate>
        <div class="grid_12" id="item2">
           <div class="grid_2"> <asp:Label ID="lblID" runat="server"><%#Eval("ID") %></asp:Label> </div>
           <div class="grid_2"> <asp:Label ID="lblMaGV" runat="server" ><%#Eval("MaGV")%></asp:Label></div> 
           <div class="grid_2"> <asp:Label ID="lblTenGV" runat="server"><%#Eval("TenGV")%></asp:Label></div>
           <div class="grid_2"> <asp:Label ID="lblEmail" runat="server" ><%#Eval("Email")%></asp:Label></div>
           <asp:LinkButton ID="EditButton" runat="server" CommandName="Edit" Text="Edit" />
           <asp:LinkButton ID="lnkDel" runat="server" Text="Delete" CommandName="Delete" OnClientClick="return confirm('Delete this entry?')" />
        </div>
    </AlternatingItemTemplate>
    <InsertItemTemplate>
     <div class="grid_12" id="item1">
          
           <div class="grid_2"><asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" /></div>
           <div class="grid_2"> <asp:TextBox ID="txtMaGV" runat="server" Text='<%#Eval("MaGV")%>'></asp:TextBox></div>
          
           <div class="grid_2"> <asp:TextBox ID="txtTenGV" runat="server" Text='<%#Eval("TenGV")%>'></asp:TextBox></div>
           <div class="grid_2"> <asp:TextBox ID="txtEmail" runat="server" Text='<%#Eval("Email")%>'></asp:TextBox></div>
          
        </div>
    </InsertItemTemplate>
    <EditItemTemplate>
    <div class="grid_12" id="item1">
          <div class="grid_2"><asp:Label ID="lblID" runat="server"><%#Eval("ID") %></asp:Label> </div>
           <div class="grid_2"> <asp:TextBox ID="txtMaGV" runat="server" Text='<%#Bind("name") %>'></asp:TextBox></div>          
           <div class="grid_2"> <asp:TextBox ID="txtTenGV" runat="server" Text='<%#Eval("TenGV")%>'></asp:TextBox></div>
           <div class="grid_2"> <asp:TextBox ID="txtEmail" runat="server" Text='<%#Eval("Email")%>'></asp:TextBox></div>
        
           <div class="grid_1"><asp:Button ID="btnUpdate" runat="server" CommandName="Update" Text="Update" /></div>
           <div class="grid_1"><asp:Button ID="btnCancel" runat="server" CommandName="Cancel" Text="Cancel" /></div>
           
        </div>
    </EditItemTemplate>
    </asp:ListView>  
    <div class="grid_12" id="item2">
 <asp:DataPager ID="DataPagerProducts" runat="server" PagedControlID="lvGiaoVIen"
    PageSize="10">
    <Fields>
        <asp:NextPreviousPagerField ShowFirstPageButton="True" ShowNextPageButton="False" />
        <asp:NumericPagerField />
        <asp:NextPreviousPagerField ShowLastPageButton="True" ShowPreviousPageButton="False" />
    </Fields>
    </asp:DataPager>
    </div>

</div>